home *** CD-ROM | disk | FTP | other *** search
- /* An example external program for Winpack 5.4 */
- /* By Andy Keir May 1996 */
-
- #include <stdio.h>
- #include <string.h>
- main(int argc, char *argv[])
- {
-
- /* The command line arguments are as follows */
- /* The number of command line arguments is argc */
- /* The full name and path of the calling program is argv[0] */
- /* The status number is argv[1] */
- /* The callsign of this station is argv[2] */
- /* The name of the operator of this station is argv[3] */
- /* The callsign of the connected station is argv[4] */
- /* The first word of the user text is argv[5] */
-
-
- /* convert the command line arguments to upper case for consistency */
-
- strupr(argv[2]);
- strupr(argv[3]);
- strupr(argv[4]);
- strupr(argv[5]);
-
- /**************************************************/
- /* your own actual useful program stuff goes here */
- /**************************************************/
-
- {
- /* open the response file and write some stuff to it */
-
- FILE *fp;
- if( (fp = fopen("extern\\aakext.rep","w" )) != NULL )
- {
- fputs( "-1" , fp );
- fputc( '\n', fp );
- fputs( "AAKEXT - an example external program for Winpack" ,fp );
- fputc( '\n', fp );
- fprintf(fp, "The program was invoked by %s",argv[4]);
- fputc( '\n', fp );
- fprintf(fp, "The user command line text is %s",argv[5]);
- fputc( '\n', fp );
- fclose( fp );
- }
- else
- printf( "an error occurred opening the response file\n" );
- }
-
-
- }
-
-
-